package com.shadow.ApiDomainDsl;

import com.mysema.query.codegen.GenericExporter;
import com.mysema.query.codegen.Keywords;
import com.shadow.domain.User;

import javax.persistence.*;
import java.io.File;

/**
 * Created by qq65827 on 2014/10/27.
 */
public class domaindsl {
    public static void main(String args[]) {
        GenericExporter exporter = new GenericExporter();
        exporter.setKeywords(Keywords.JPA);
        exporter.setEntityAnnotation(Entity.class);
        exporter.setEmbeddableAnnotation(Embeddable.class);
        exporter.setEmbeddedAnnotation(Embedded.class);
        exporter.setSupertypeAnnotation(MappedSuperclass.class);
        exporter.setSkipAnnotation(Transient.class);
        exporter.setTargetFolder(new File("src/main/java"));
        exporter.setPackageSuffix(".dsl");
        exporter.export(User.class.getPackage());
        System.out.println("Domain dsl is already OK....");
    }
}
